* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  font-size: 62.5%;
  overflow: hidden;
  font-family: "PingFang SC,-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,sans-serif" !important;
  scroll-behavior: smooth;
}

body,
#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tc {
  text-align: center;
}

.flex-y {
  display: flex;
  justify-content: center;
}

.flex-x {
  display: flex;
  align-items: center;
}

.flex-column {
  flex-direction: column;
}

.flex-x-end {
  display: flex;
  align-items: end;
}

.flex-around {
  display: flex;
  justify-content: space-around;
}

.flex-between {
  display: flex;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.setting-panel {
  padding: 8px 16px;
  background-color: var(--bg-card);
  border-radius: 6px;
  color: var(--d-main);
}

//设置
.sidebar-autoHide {
  font-size: 13px;
  line-height: 36px;

  .slider-title {
    min-width: 60px;
  }
}

//设置里的滑块侧边输入框演示
.el-slider__input {
    width: 40px !important;
    position: relative;

    .slider__runway {
      margin-right: 0;
    }
    .el-input-number__decrease {
      width: 0;
      left: auto;
      top: auto;
      right: 1px;
      bottom: 0px;
      background-color: transparent;
      border: none;
      opacity: 0;
      transition: all 0.2s;
    }

    .el-input-number__increase {
      width: 0;
      left: auto;
      top: 1px;
      right: 1px;
      bottom: auto;
      background-color: transparent;
      border: none;
      opacity: 0;
      transition: all 0.2s;
    }

    &:hover {
      .el-input-number__decrease,
      .el-input-number__increase {
        width: 15px;
        opacity: 1;
      }

      .el-input {
        .el-input__wrapper {
          padding: 0;
          .el-input__inner {
            transform: translateX(-15px);
          }
        }
      }
    }

    .el-input {
      .el-input__wrapper {
        padding: 0;
        .el-input__inner {
          padding-right: 2px;
          text-align: right;
          transition: all 0.2s;
        }
      }
    }
  }

.light {
  --primary-color: var(--el-color-primary);
  --alpha-color: 0, 0, 0;
  --alpha-bg: 255, 255, 255;
  --bg-body: #f1f0f5;
  --bg-card: #fff;
  --bg-info: #f5f5f5;
  --bg-input: #f0f1f4;
  --bg-hover: #e2e0e0;
  --bg-btn: #dcdada;
  --add-dialog-bg: #f1f0f5;
  --add-input:#f1f0f4;
  --time-color: #fff;
  --icon-title: #fff;
  --icon-bg:#000;
  --search-bg: rgba(255, 255, 255, 0.7);
  --search-input-bg: transparent;
  --dividing-line: #f2f2f2;
  --border-card: var(--dividing-line);
  --d-contextmenu-bg: #0b0b0bcc;
  --d-contextmenu-color: #fff;
  --d-main: #222;
  --d-sub: #939393;
  --d-hover: rgba(var(--alpha-color), 0.5);
  --n-dot-color: rgba(0, 0, 0, 0.15);
  --n-dot-color-active: rgba(0, 0, 0, 0.6);
}

.dark {
  --primary-color: var(--el-color-primary);
  --alpha-color: 255, 255, 255;
  --alpha-bg: 0, 0, 0;
  --bg-body: #0c0c0c;
  --bg-card: #1c1c1e;
  --bg-info: #f5f5f5;
  --bg-input: #f0f1f4;
  --bg-hover: #e2e0e0;
  --bg-btn: #dcdada;
  --add-dialog-bg: #0c0c0c;
  --add-input:#25252c;
  --time-color: #1c1c1e;
  --icon-title: #fff;
  --icon-bg:#313131;
  --search-bg: rgba(0, 0, 0, 0.5);
  --search-input-bg: transparent;
  --dividing-line: #f2f2f2;
  --border-card: var(--dividing-line);
  --d-contextmenu-bg: #0b0b0bcc;
  --d-contextmenu-color: #fff;
  --d-main: #dfdddd;
  --d-sub: #939393;
  --d-hover: rgba(var(--alpha-color), 0.5);
  --n-dot-color: rgba(255, 255, 255, 0.15);
  --n-dot-color-active: rgba(255, 255, 255, 0.6);
}

.d-sub {
  color: var(--d-sub);
}

.d-primary {
  color: var(--primary-color);
}

.pointer {
  cursor: pointer;
}

//字体超过长度，隐藏并出现省略号
.text-omit {
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

//字体展示两行,超出的部分隐藏并出现省略号
.text-clip2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  overflow: hidden;
}

//右键菜单
.d-contextmenu {
  position: fixed;
  left: 0;
  top: 0;
  width: 140px;
  border-radius: 8px;
  padding: 5px 4px;
  box-shadow: 0 10px 30px #00000080;
  background-color: var(--d-contextmenu-bg);
  backdrop-filter: blur(10px);
  z-index: 999;
}

.d-contextmenu-animation {
  animation: scale 0.2s both;
  transform-origin: 0% 0%;
}

@keyframes scale {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.d-contextmenu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--d-contextmenu-color);
  padding: 0 4px;
  margin: 4px 0;
  line-height: 30px;
  border-radius: 6px;
  cursor: pointer;

  &:hover {
    background-color: rgba(#fff, 0.1);
  }
}

.d-contextmenu-item-app {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--d-contextmenu-color);
  padding: 0 4px;
  margin: 4px 0;
  line-height: 30px;
  border-radius: 6px;
  cursor: pointer;

  &:hover {
    background-color: rgba(#fff, 0.1);
  }
}

.d-contextmenu-item-layout {
  color: var(--d-contextmenu-color);
  padding: 0 4px;
  margin: 4px 0;
  overflow: hidden;

  .layout-header {
    display: flex;
    align-items: center;
    font-size: 11px;
  }

  .layout-content {
    margin-top: 10px;
    p {
      height: 20px;
      width: 36px;
      margin: 0 2px 4px;
      line-height: 20px;
      background-color: #ffffff1a;
      border-radius: 12px;
      text-align: center;
      float: left;
      cursor: pointer;

      &:hover {
        background-color: rgba(var(--alpha-bg), 0.1);
      }

      &.active {
        background-color: rgba(var(--alpha-bg), 0.2);
      }
    }
  }
}

//颜色选择列表
.color-select-list {
    justify-content: space-around;
    list-style: none;
    align-items: center;
    width: 100%;

    .color-select-item {
      height: 18px;
      width: 18px;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      border: 1px solid transparent;
      cursor: pointer;
      position: relative;
      font-size: 18px;
      transition: all 0.3s;

      &:hover{
        box-shadow: 0 0.5rem 1rem rgba($color: #000000, $alpha: .5);
      }

      .icon {
        position: absolute;
        bottom: 0;
        left: 0;
      }
    }
  }